package com.zzyl.mapper;

import com.zzyl.entity.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserRoleMapper {
    /**
     * 查看禁用状态下子路径数量
     * @param id
     * @return
     */
    @Select("select count(*) from sys_user_role where role_id = #{id};")
    Integer countByRoleId(Long id);

    /**
     * 批量新增中间表
     * @param list
     * @return
     */
    Boolean insertBatch(@Param("list") List<UserRole> list);
}
